package Merlion.util.state;

import Merlion.CRM.entity.LineEntryEntity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class DeliveryOrderState implements Serializable {

    private Long id;
    private Long salesOrderId;
    private String status;
    private String shippingMethod="";
    private String shippingRule;
    private String shippingCompany;
    private Long clientId;
    private String clientName;
    private Long contactId;
    private String contactName;
    private String deleteFlag;
    private Date dueDate;
    private Date dateIssued;
    private Date checkBy;
    private String freightCostRule;
    private double freightCost;
    private double totalPrice;
    private String description;
    private String pricingType;
    private String paymentMethod;
    private List<LineEntryEntity> lineEntryList;
    //for primary billing address
    private Long billingId;
    private String billingStreet = "";
    private String billingState = "";
    private String billingCity = "";
    private String billingCode = "";
    private String billingCountry = "";
    
    //for primary shipping address;
    private Long shippingId;
    private String shippingStreet = "";
    private String shippingState = "";
    private String shippingCity = "";
    private String shippingCode = "";
    private String shippingCountry = "";
    private String documentName;

    public DeliveryOrderState(Long id, Long salesOrderId, String status, String shippingMethod,
            String shippingRule, Date dueDate, Date dateIssued, Date checkBy,
            String freightCostRule) {
        this.setId(id);
        this.setSalesOrderId(salesOrderId);
        this.setStatus(status);
        this.setShippingMethod(shippingMethod);
        this.setShippingRule(shippingRule);
        this.setDueDate(dueDate);
        this.setDateIssued(dateIssued);
        this.setCheckBy(checkBy);
        this.setFreightCostRule(freightCostRule);
    }

    public DeliveryOrderState(Long id, Long salesOrderId, String status, 
            String shippingMethod, String shippingRule, String shippingCompany, 
            Long clientId, String clientName, Long contactId, String contactName, 
            String deleteFlag, Date dueDate, Date dateIssued, Date checkBy,
            String freightCostRule, double freightCost, double totalPrice,
            String description, String pricingType, String paymentMethod, 
            Long billingId, Long shippingId, String documentName, List<LineEntryEntity> lineEntryList) {
        this.id = id;
        this.salesOrderId = salesOrderId;
        this.status = status;
        this.shippingMethod = shippingMethod;
        this.shippingRule = shippingRule;
        this.shippingCompany = shippingCompany;
        this.clientId = clientId;
        this.clientName = clientName;
        this.contactId = contactId;
        this.contactName = contactName;
        this.deleteFlag = deleteFlag;
        this.dueDate = dueDate;
        this.dateIssued = dateIssued;
        this.checkBy = checkBy;
        this.freightCostRule = freightCostRule;
        this.freightCost = freightCost;
        this.totalPrice = totalPrice;
        this.description = description;
        this.pricingType = pricingType;
        this.paymentMethod = paymentMethod;
        this.billingId = billingId;
        this.shippingId = shippingId;
        this.documentName = documentName;
        this.lineEntryList = lineEntryList;
    }

    public List<LineEntryEntity> getLineEntryList() {
        lineEntryList.size();
        
        return lineEntryList;
    }

    public void setLineEntryList(List<LineEntryEntity> lineEntryList) {
        this.lineEntryList = lineEntryList;
    }
    
    
    

    public DeliveryOrderState() {
    }

    public Date getCheckBy() {
        return checkBy;
    }

    public void setCheckBy(Date checkBy) {
        this.checkBy = checkBy;
    }

    public Date getDateIssued() {
        return dateIssued;
    }

    public void setDateIssued(Date dateIssued) {
        this.dateIssued = dateIssued;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public double getFreightCost() {
        return freightCost;
    }

    public void setFreightCost(double freightCost) {
        this.freightCost = freightCost;
    }

    public String getFreightCostRule() {
        return freightCostRule;
    }

    public void setFreightCostRule(String freightCostRule) {
        this.freightCostRule = freightCostRule;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSalesOrderId() {
        return salesOrderId;
    }

    public void setSalesOrderId(Long salesOrderId) {
        this.salesOrderId = salesOrderId;
    }

    public String getShippingCompany() {
        return shippingCompany;
    }

    public void setShippingCompany(String shippingCompany) {
        this.shippingCompany = shippingCompany;
    }

    public String getShippingMethod() {
        return shippingMethod;
    }

    public void setShippingMethod(String shippingMethod) {
        this.shippingMethod = shippingMethod;
    }

    public String getShippingRule() {
        return shippingRule;
    }

    public void setShippingRule(String shippingRule) {
        this.shippingRule = shippingRule;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        if (description.equals("")) {
            description = "No description found.";
        }
        this.description = description;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public String getPricingType() {
        return pricingType;
    }

    public void setPricingType(String pricingType) {
        this.pricingType = pricingType;
    }

    public String getBillingCity() {
        return billingCity;
    }

    public void setBillingCity(String billingCity) {
        this.billingCity = billingCity;
    }

    public String getBillingCode() {
        return billingCode;
    }

    public void setBillingCode(String billingCode) {
        this.billingCode = billingCode;
    }

    public String getBillingCountry() {
        return billingCountry;
    }

    public void setBillingCountry(String billingCountry) {
        this.billingCountry = billingCountry;
    }

    public Long getBillingId() {
        return billingId;
    }

    public void setBillingId(Long billingId) {
        this.billingId = billingId;
    }

    public String getBillingState() {
        return billingState;
    }

    public void setBillingState(String billingState) {
        this.billingState = billingState;
    }

    public String getBillingStreet() {
        return billingStreet;
    }

    public void setBillingStreet(String billingStreet) {
        this.billingStreet = billingStreet;
    }

    public Long getClientId() {
        return clientId;
    }

    public void setClientId(Long clientId) {
        this.clientId = clientId;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public Long getContactId() {
        return contactId;
    }

    public void setContactId(Long contactId) {
        this.contactId = contactId;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getShippingCity() {
        return shippingCity;
    }

    public void setShippingCity(String shippingCity) {
        this.shippingCity = shippingCity;
    }

    public String getShippingCode() {
        return shippingCode;
    }

    public void setShippingCode(String shippingCode) {
        this.shippingCode = shippingCode;
    }

    public String getShippingCountry() {
        return shippingCountry;
    }

    public void setShippingCountry(String shippingCountry) {
        this.shippingCountry = shippingCountry;
    }

    public Long getShippingId() {
        return shippingId;
    }

    public void setShippingId(Long shippingId) {
        this.shippingId = shippingId;
    }

    public String getShippingState() {
        return shippingState;
    }

    public void setShippingState(String shippingState) {
        this.shippingState = shippingState;
    }

    public String getShippingStreet() {
        return shippingStreet;
    }

    public void setShippingStreet(String shippingStreet) {
        this.shippingStreet = shippingStreet;
    }

    public String getDocumentName() {
        return documentName;
    }

    public void setDocumentName(String documentName) {
        if (documentName.equals("")) {
            documentName = "New Sales Document";
        }
        this.documentName = documentName;
 
    }
    
    
    
}

